﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using AMS.DataAccess.Trademark.Interfaces;

/// <summary>
/// Summary description for RFCategoryProvider
/// </summary>
public class RFCategoryProvider
{
    private RFCategoryProvider()
    {
        
    }

    public static DataTable GetRFCategory(HttpApplicationState Application)
    {
        DataTable dt = Application[Constants.RFCategoryCasheKey] as DataTable;
        if (dt == null)
        {
            IRecvFileManager mgr = ManagerFactory.CreateRecvFileManager();
            dt = mgr.GetAllCategoryRecvFiles();
            Application.Lock();
            if (Application[Constants.RFCategoryCasheKey] == null)
            {
                Application[Constants.RFCategoryCasheKey] = dt;
            }
            Application.UnLock();
        }
        return dt;
    }
}
